package exam.web.action;

import java.util.List;

import exam.business.service.SubQuestionGetListService;
import exam.common.key.KeySubQuestion;
import exam.model.entity.TSubQuestionEntity;
import exam.web.action.base.SubQuestionActionBase;
/**
 * <p>IndexSubQuestionAction</p>
 * <p>Action: Hiển thị danh sách danh mục câu hỏi</p>
 * 
 * @author Phong
 * @version (update: 20/05/2012)
 */
public class IndexSubQuestionAction extends SubQuestionActionBase {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	// tSubQuestionEntityList
	private List<TSubQuestionEntity> tSubQuestionEntityList;
	
	@Override
	public String execute() throws Exception {
		SubQuestionGetListService subQuestionGetListService = new SubQuestionGetListService();
		// Gui yeu cau lay danh sach danh muc cau hoi
		subQuestionGetListService.executeService(serviceInfo);
		// Lay ket qua tu serviceInfo
		tSubQuestionEntityList = serviceInfo.getList(KeySubQuestion.T_SUB_QUESTION_ENTITY_LIST);
		return SUCCESS;
	}
	
	public List<TSubQuestionEntity> gettSubQuestionEntityList() {
		return tSubQuestionEntityList;
	}
	
	public void settSubQuestionEntityList(
			List<TSubQuestionEntity> tSubQuestionEntityList) {
		this.tSubQuestionEntityList = tSubQuestionEntityList;
	}
}
